package com.mervin.patterns.prototype;

/***************************************
 * @Auther: mervin
 * @Date: 2020-04-18 00:27
 * @Description:
 ***************************************/
public class Client {

    public static void main(String[] args) throws CloneNotSupportedException {
        Resume xmResume = new Resume("小明", "男", "18855555555");
        WorkExperience xmWorkExperience = new WorkExperience("2019-2020", "Tencent");
        xmResume.setWorkExperience(xmWorkExperience);
        Resume xhResume = (Resume)xmResume.clone();
        xhResume.getWorkExperience().setCompany("microsoft");
        System.out.println(xmResume);
        System.out.println(xhResume);
        System.out.println(xmResume == xhResume); // false
    }
}
